package com.azt.provider.mapper;

import java.util.List;

import com.azt.api.dto.EnqProjectExt;
import org.apache.ibatis.annotations.Param;

import com.azt.api.dto.EnProjectShowItem;
import com.azt.api.pojo.EnqProject;
import tk.mybatis.mapper.common.Mapper;

public interface EnqProjectMapper extends Mapper<EnqProject> {

	List<EnProjectShowItem> getEnqProjectItemByCompanyId(@Param("companyId")Integer companyId,@Param("keyword")String keyword,@Param("sdate")String sdate,@Param("endate")String endate);

    /**
     * 获取project扩展
     * Created by 张栋 on 2016/10/21 14:55
     */
    EnqProjectExt getEnqProjectExtById(Integer projid);


    /**
     * 获取项目下面的订单数量,根据订单状态
     * Created by 张栋 on 2016/11/14 11:04
     */
    int getOrderInfoCount(@Param("projectId") Integer projectId,@Param("orderstat") Integer orderstat);

    /*项目下的订单,状态为待付款的,设置为removed*/
    Integer updateOrderRemoved(Integer projectId);

    /**
     * 该询价下面有没有待付款的订单
     * Created by 张栋 on 2016/11/21 13:34
     */
    Integer getOrderInfoCountEnquiry(@Param("enqid") Integer enqid,@Param("orderstat") Integer orderstat);
}